package at.guigu.config;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Controller;

// 该注解代表该类是Spring的核心配置类
@Configuration
// 配置注解的组件扫描<context:component-scan base-package="at.guigu.dao, at.guigu.service"></context:component-scan>
@ComponentScan(value = "at.guigu",
        excludeFilters = @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = Controller.class))

@MapperScan("at.guigu.dao")
// 引入拆分配置文件<import resource="applicationContext-xxx.xml"/>
@Import({DataSourceConfiguration.class, MyBatisConfiguration.class})
public class SpringConfiguration {
}